const WindowMenu = imports.ui.windowMenu;
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
-const MAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
-const UNMAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
const MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
const SHOW_WINDOW_ANIMATION_TIME = 0.15;
const DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
this._minimizing = [];
this._unminimizing = [];
- this._maximizing = [];
- this._unmaximizing = [];
this._mapping = [];
this._destroying = [];
this._movingWindow = null;
this._shellwm.connect('kill-switch-workspace', Lang.bind(this, this._switchWorkspaceDone));
this._shellwm.connect('kill-window-effects', Lang.bind(this, function (shellwm, actor) {
this._minimizeWindowDone(shellwm, actor);
- this._maximizeWindowDone(shellwm, actor);
- this._unmaximizeWindowDone(shellwm, actor);
this._mapWindowDone(shellwm, actor);
this._destroyWindowDone(shellwm, actor);
}));
this._shellwm.connect('show-window-menu', Lang.bind(this, this._showWindowMenu));
this._shellwm.connect('minimize', Lang.bind(this, this._minimizeWindow));
this._shellwm.connect('unminimize', Lang.bind(this, this._unminimizeWindow));
- this._shellwm.connect('maximize', Lang.bind(this, this._maximizeWindow));
- this._shellwm.connect('unmaximize', Lang.bind(this, this._unmaximizeWindow));
this._shellwm.connect('map', Lang.bind(this, this._mapWindow));
this._shellwm.connect('destroy', Lang.bind(this, this._destroyWindow));
this._shellwm.connect('filter-keybinding', Lang.bind(this, this._filterKeybinding));
}
},
-
- _maximizeWindow : function(shellwm, actor, targetX, targetY, targetWidth, targetHeight) {
- shellwm.completed_maximize(actor);
- },
-
- _maximizeWindowDone : function(shellwm, actor) {
- },
-
- _maximizeWindowOverwrite : function(shellwm, actor) {
- },
-
- _unmaximizeWindow : function(shellwm, actor, targetX, targetY, targetWidth, targetHeight) {
- shellwm.completed_unmaximize(actor);
- },
-
- _unmaximizeWindowDone : function(shellwm, actor) {
+ _sizeChangeWindow : function(shellwm, actor, whichChange, oldFrameRect, oldBufferRect) {
+ shellwm.completed_size_change(actor);
},
_hasAttachedDialogs: function(window, ignoreWindow) {
MetaWindowActor *actor);
static void gnome_shell_plugin_unminimize (MetaPlugin *plugin,
MetaWindowActor *actor);
-static void gnome_shell_plugin_maximize (MetaPlugin *plugin,
+static void gnome_shell_plugin_size_change (MetaPlugin *plugin,
MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height);
-static void gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
- MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height);
+ MetaSizeChange which_change,
+ MetaRectangle *old_rect,
+ MetaRectangle *new_rect);
static void gnome_shell_plugin_map (MetaPlugin *plugin,
MetaWindowActor *actor);
static void gnome_shell_plugin_destroy (MetaPlugin *plugin,
plugin_class->map = gnome_shell_plugin_map;
plugin_class->minimize = gnome_shell_plugin_minimize;
plugin_class->unminimize = gnome_shell_plugin_unminimize;
- plugin_class->maximize = gnome_shell_plugin_maximize;
- plugin_class->unmaximize = gnome_shell_plugin_unmaximize;
+ plugin_class->size_change = gnome_shell_plugin_size_change;
plugin_class->destroy = gnome_shell_plugin_destroy;
plugin_class->switch_workspace = gnome_shell_plugin_switch_workspace;
}
static void
-gnome_shell_plugin_maximize (MetaPlugin *plugin,
- MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- _shell_wm_maximize (get_shell_wm (),
- actor, x, y, width, height);
-}
-
-static void
-gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
- MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height)
+gnome_shell_plugin_size_change (MetaPlugin *plugin,
+ MetaWindowActor *actor,
+ MetaSizeChange which_change,
+ MetaRectangle *old_frame_rect,
+ MetaRectangle *old_buffer_rect)
{
- _shell_wm_unmaximize (get_shell_wm (),
- actor, x, y, width, height);
+ _shell_wm_size_change (get_shell_wm (), actor, which_change, old_frame_rect, old_buffer_rect);
}
static void
MetaWindowActor *actor);
void _shell_wm_unminimize (ShellWM *wm,
MetaWindowActor *actor);
-void _shell_wm_maximize (ShellWM *wm,
+void _shell_wm_size_change(ShellWM *wm,
MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height);
-void _shell_wm_unmaximize (ShellWM *wm,
- MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height);
+ MetaSizeChange which_change,
+ MetaRectangle *old_rect,
+ MetaRectangle *new_rect);
void _shell_wm_map (ShellWM *wm,
MetaWindowActor *actor);
void _shell_wm_destroy (ShellWM *wm,
#include <string.h>
+#include <meta/meta-enum-types.h>
#include <meta/keybindings.h>
#include "shell-wm-private.h"
{
MINIMIZE,
UNMINIMIZE,
- MAXIMIZE,
- UNMAXIMIZE,
+ SIZE_CHANGE,
MAP,
DESTROY,
SWITCH_WORKSPACE,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
META_TYPE_WINDOW_ACTOR);
- shell_wm_signals[MAXIMIZE] =
- g_signal_new ("maximize",
+ shell_wm_signals[SIZE_CHANGE] =
+ g_signal_new ("size-change",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
- G_TYPE_NONE, 5,
- META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
- shell_wm_signals[UNMAXIMIZE] =
- g_signal_new ("unmaximize",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 5,
- META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
+ G_TYPE_NONE, 4,
+ META_TYPE_WINDOW_ACTOR, META_TYPE_SIZE_CHANGE, META_TYPE_RECTANGLE, META_TYPE_RECTANGLE);
shell_wm_signals[MAP] =
g_signal_new ("map",
G_TYPE_FROM_CLASS (klass),
meta_plugin_unminimize_completed (wm->plugin, actor);
}
-/**
- * shell_wm_completed_maximize:
- * @wm: the ShellWM
- * @actor: the MetaWindowActor actor
- *
- * The plugin must call this when it has completed a window maximize effect.
- **/
-void
-shell_wm_completed_maximize (ShellWM *wm,
- MetaWindowActor *actor)
-{
- meta_plugin_maximize_completed (wm->plugin, actor);
-}
-
-/**
- * shell_wm_completed_unmaximize:
- * @wm: the ShellWM
- * @actor: the MetaWindowActor actor
- *
- * The plugin must call this when it has completed a window unmaximize effect.
- **/
void
-shell_wm_completed_unmaximize (ShellWM *wm,
- MetaWindowActor *actor)
+shell_wm_completed_size_change (ShellWM *wm,
+ MetaWindowActor *actor)
{
- meta_plugin_unmaximize_completed (wm->plugin, actor);
+ meta_plugin_size_change_completed (wm->plugin, actor);
}
/**
}
void
-_shell_wm_maximize (ShellWM *wm,
- MetaWindowActor *actor,
- int target_x,
- int target_y,
- int target_width,
- int target_height)
-{
- g_signal_emit (wm, shell_wm_signals[MAXIMIZE], 0, actor, target_x, target_y, target_width, target_height);
-}
-
-void
-_shell_wm_unmaximize (ShellWM *wm,
- MetaWindowActor *actor,
- int target_x,
- int target_y,
- int target_width,
- int target_height)
+_shell_wm_size_change (ShellWM *wm,
+ MetaWindowActor *actor,
+ MetaSizeChange which_change,
+ MetaRectangle *old_frame_rect,
+ MetaRectangle *old_buffer_rect)
{
- g_signal_emit (wm, shell_wm_signals[UNMAXIMIZE], 0, actor, target_x, target_y, target_width, target_height);
+ g_signal_emit (wm, shell_wm_signals[SIZE_CHANGE], 0, actor, which_change, old_frame_rect, old_buffer_rect);
}
void
MetaWindowActor *actor);
void shell_wm_completed_unminimize (ShellWM *wm,
MetaWindowActor *actor);
-void shell_wm_completed_maximize (ShellWM *wm,
- MetaWindowActor *actor);
-void shell_wm_completed_unmaximize (ShellWM *wm,
+void shell_wm_completed_size_change (ShellWM *wm,
MetaWindowActor *actor);
void shell_wm_completed_map (ShellWM *wm,
MetaWindowActor *actor);